package com.brillilab.service.core.topics;

import com.brillilab.common.entity.PageVo;
import com.brillilab.domain.po.topics.Topic;
import com.brillilab.domain.vo.topics.TopicFileVo;
import com.brillilab.domain.vo.topics.TopicListVo;
import com.brillilab.domain.vo.topics.TopicScheduleVo;

import java.util.List;

public interface ITopicService {

	PageVo<TopicListVo> getIndexTopicList(Long labId, List<Long> memberIds, Integer state, int pageNum, int pageSize);

	Topic insert(Topic topic);

	List<Topic> selectList(List<Long> topicIds);

	List<Topic> selectList(Long labMemberId, List<Integer> states);

	List<Topic> selectListByLabMemberIds(Long labId, List<Long> labMemberIds, List<Integer> states);

	Topic selectById(Long topicId);

	boolean update(Topic topic);

	List<Topic> selectListByLabId(Long labId);

	List<Topic> getMainExecutorTopicList(Long executorId);

	List<TopicListVo> getIndexTopicList(Long labId, Long labMemberId);

	int getTopicCount(Long labId);

	int getTopicCountByExecutorId(Long labMemberId);

	int updateById(Topic topic);

	/**
	 * 设置课题相关状态为进行中
	 *
	 * @param topicId
	 */
	void setTopicStateUnderWay(Long topicId);

	List<Topic> recycleBinList(Long labId, List<Long> memberIds);

	/**
	 * 根据实验室成员id获取课题数
	 */
	Integer getTopicCountByLabMemberId(Long labMemberId);

	Integer getTopicCountByLabId(Long labId);

	List<TopicFileVo> getTopicFileList(Long labId, Long topicId);

	void deleteById(Long topicId);

	/**
	 * 新曾课题时判断主执行人和成员是否存在于他人课题
	 * 
	 * @param membersAndExecutor
	 * @param executorId
	 * @return
	 */
	boolean executorOrMemberExistInOtherTopic(List<Long> membersAndExecutor, Long executorId);

	/**
	 * 获取课题进度
	 * 
	 * @param memberIds
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	PageVo<TopicScheduleVo> getTopicSchedule(Long labId, List<Long> memberIds, int pageNum, int pageSize);

	List<Topic> getTopicByMainExecutorId(Long mainExecutorId);
}
